﻿using System.ComponentModel;

namespace WinSource.Model
{
    public class Settings : INotifyPropertyChanged
    {
        #region Fields

        private bool _isRefreshAutomatic;
        private bool _isDownloadingArticleOffline;
        private bool _isToastNotificationUsed;
        
        #endregion

        #region Properties

        public bool IsRefreshAutomatic
        {
            get { return _isRefreshAutomatic; }
            
            set
            {
                if (_isRefreshAutomatic != value)
                {
                    _isRefreshAutomatic = value;

                    PropertyChanged(this, new PropertyChangedEventArgs("IsRefreshAutomatic"));
                }
            }
        }

        public bool IsDownloadingArticlesOffline
        {
            get { return _isDownloadingArticleOffline; }

            set
            {
                if (_isDownloadingArticleOffline != value)
                {
                    _isDownloadingArticleOffline = value;

                    PropertyChanged(this, new PropertyChangedEventArgs("IsDownloadingArticleOffline"));
                }
            }
        }

        public bool IsToastNotificationUsed
        {
            get { return _isToastNotificationUsed; }

            set
            {
                if (_isToastNotificationUsed != value)
                {
                    _isToastNotificationUsed = value;

                    PropertyChanged(this, new PropertyChangedEventArgs("IsToastNotificationUsed"));
                }
            }
        }
        
        #endregion

        #region Event Handlers

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }
}
